home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_perl.idb / usr / freeware / catman / p_man / cat3 / Env.Z / Env
Encoding:
Text File  |  1998-10-28  |  1.6 KB  |  67 lines

  1.  
  2.  
  3.  
  4.      EEEEnnnnvvvv((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))        EEEEnnnnvvvv((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       Env -    perl module that imports environment variables
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           use Env;
  13.           use Env qw(PATH HOME TERM);
  14.  
  15.  
  16.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.       Perl maintains environment variables in a pseudo-hash    named
  18.       %ENV.     For when this access method is    inconvenient, the Perl
  19.       module Env allows environment    variables to be    treated    as
  20.       simple variables.
  21.  
  22.       The _E_n_v::_i_m_p_o_r_t() function ties environment variables    with
  23.       suitable names to global Perl    variables with the same    names.
  24.       By default it    does so    with all existing environment
  25.       variables (keys %ENV).  If the import    function receives
  26.       arguments, it    takes them to be a list    of environment
  27.       variables to tie; it's okay if they don't yet    exist.
  28.  
  29.       After    an environment variable    is tied, merely    use it like a
  30.       normal variable.  You    may access its value
  31.  
  32.           @path = split(/:/, $PATH);
  33.  
  34.       or modify it
  35.  
  36.           $PATH .= ":.";
  37.  
  38.       however you'd    like.  To remove a tied    environment variable
  39.       from the environment,    assign it the undefined    value
  40.  
  41.           undef $PATH;
  42.  
  43.  
  44.      AAAAUUUUTTTTHHHHOOOORRRR
  45.       Chip Salzenberg <_c_h_i_p@_f_i_n._u_u_c_p>
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 10/23/98)
  64.  
  65.  
  66.  
  67.